﻿namespace RuoYi.Framework.Authentication.JwtBearer;

/// <summary>
/// JWT认证配置
/// </summary>
[SuppressSniffer]
public sealed class JwtBearerOptions
{
    /// <summary>
    /// 颁发者,token是谁颁发的
    /// </summary>
    public string Issuer { get; set; } = string.Empty;
    /// <summary>
    /// 订阅者,token可以给哪些客户端使用
    /// </summary>
    public string Audience { get; set; } = string.Empty;
    /// <summary>
    /// 加密的key
    /// </summary>
    public string SecretKey { get; set; } = string.Empty;
    public bool ValidateIssuer { get; set; } = true;
    public bool ValidateAudience { get; set; } = true;
    public bool ValidateLifetime { get; set; } = true;
    public bool ValidateIssuerSigningKey { get; set; } = true;
    /// <summary>
    /// 过期时间,单位分钟
    /// </summary>
    public long TokenExpirationMinutes { get; set; } = 30; 
}
